<?php

/**
 * params.php
 *
 * Holds frontend specific application parameters.
 * @author Tuong Tran <tuong.tran@outlook.com>
 */
$paramsCommonFile = ROOT . DIRECTORY_SEPARATOR. 'common' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'params.php';

$paramsCommonArray = file_exists($paramsCommonFile) ? require($paramsCommonFile) : array();

return CMap::mergeArray(
    $paramsCommonArray,
     // merge frontend specific with resulting env-local merge *override by local
    array(
        'url.rules' => array(
            '' => 'site/Index',
            'home' => 'site/Index',
           //'site/searchdate'=>'site/SearchDate',
           'register'=>'user/SignUp',
           'save_booking'=>'site/SaveBooking',
            'contact' => 'site/contact',
           // 'about' => 'site/',
           // '<detail:[\w-]+>'=>'site/detail',
           // 'site/<booking:[\w-]+>'=>'site/book',
            //'site/book_engine/<id:\d+>'=>'site/Book_Engine/id/<id>',
           // 'site/city/<alias:>'=>'site/City/country_iso/<alias>',
            //'<slug:[\w-]+>' => 'site/information',
            /* for REST please @see http://www.yiiframework.com/wiki/175/how-to-create-a-rest-api/ */
            /* other @see http://www.yiiframework.com/doc/guide/1.1/en/topics.url */
            '<controller:\w+>/<id:\d+>' => '<controller>/view',
             '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
             '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
         ),
         // add here all frontend-specific parameters
        'pageSize' => 10
    )
);